home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / NewIconsV3.1upd / newicon.doc next >
Text File  |  1996-08-22  |  6KB  |  196 lines

  1. TABLE OF CONTENTS
  2.  
  3. newicon.library/GetNewDiskObject
  4. newicon.library/PutNewDiskObject
  5. newicon.library/FreeNewDiskObject
  6. newicon.library/RemapChunkyImage
  7. newicon.library/FreeRemappedImage
  8.  
  9.  
  10. GetNewDiskObject                                             GetNewDiskObject
  11.  
  12.  
  13.    NAME
  14.       GetNewDiskObject() -- Read a disk object, with NewIcons support.
  15.  
  16.    SYNOPSIS
  17.       newdiskobj = GetNewDiskObject(name)
  18.         D0                           A0
  19.  
  20.       struct NewDiskObject *GetNewDiskObject(char *);
  21.  
  22.    FUNCTION
  23.       Pretty much like the standard icon.library GetDiskObject() call.
  24.       It will read the Workbench disk object specified in the name parameter,
  25.       adding the ".info" suffix itself, and return a filled NewDiskObject
  26.       structure.  If the call fails, it returns zero.  The reason for the
  27.       failure can be obtained by calling IoError().
  28.       
  29.       This routine can be used if you wish to obtain a standard diskobject,
  30.       with separate pointers to NewIcons chunky data if there's NewIcons
  31.       imageries present in the loaded disk object.
  32.        
  33.       Once finished with it, you must use FreeNewDiskObject() to free the
  34.       memory that was allocated for it.
  35.  
  36.  
  37.    INPUTS
  38.       name -- The name (* char) of the object (without the ".info" suffix).
  39.  
  40.  
  41.    RESULT
  42.       newdiskobj -- a filled NewDiskObject structure.  You must call
  43.                     FreeNewDiskObject() once you're done with it.
  44.  
  45.  
  46.    SEE ALSO
  47.       newicon.library/FreeNewDiskObject(),  newicon.library/RemapChunkyData(),
  48.       icon.library/GetDiskObject()
  49. PutNewDiskObject                                             PutNewDiskObject
  50.  
  51.  
  52.    NAME
  53.       PutNewDiskObject() -- write a NewDiskObject to disk.
  54.  
  55.    SYNOPSIS
  56.       status = PutNewDiskObject(name, newdiskobj)
  57.         D0                       A0     A1
  58.  
  59.       BOOL  PutNewDiskObject(char *, struct NewDiskObject);
  60.  
  61.  
  62.    FUNCTION
  63.       Pretty much like the standard icon.library PutDiskObject() call.
  64.       This routine will write a NewDiskObject structure and its related
  65.       information to disk as a standard icon, encoding the chunky data
  66.       (if present in the structure) as NewIcons tooltypes in the process.
  67.  
  68.       The filename of the info file is specified as the name parameter,
  69.       which will automaticaly get the ".info" suffix added.  If the call
  70.       fails, it returns zero.  The reason for the failure can be obtained
  71.       by calling IoError().
  72.       
  73.  
  74.    INPUTS
  75.       name -- The name (* char) of the object (without the ".info" suffix).
  76.       newdiskobj -- A pointer to a NewDiskObject structure.
  77.  
  78.  
  79.    RESULT
  80.       status -- TRUE if the call was successfull, else FALSE.
  81.  
  82.  
  83.    SEE ALSO
  84.       newicon.library/FreeNewDiskObject(),
  85.       newicon.library/GetNewDiskObject(), icon.library/PutDiskObject()
  86. FreeNewDiskObject                                           GreeNewDiskObject
  87.  
  88.  
  89.    NAME
  90.       FreeNewDiskObject() -- Free all memory allocated in a NewDiskObject.
  91.  
  92.    SYNOPSIS
  93.       FreeNewDiskObject(newdiskobj)
  94.                            A0
  95.  
  96.       VOID  FreeNewDiskObject(struct NewDiskObject *);
  97.  
  98.  
  99.    FUNCTION
  100.       Pretty much like the standard icon.library FreeDiskObject() call.
  101.       It will deallocate any memory allocated for a NewDiskObject, and
  102.       the object itself.  This is the ONLY way to deallocate a NewDiskObject
  103.       structure that has been allocated by GetNewDiskObject().
  104.  
  105.       
  106.    INPUTS
  107.       newdiskobj -- A pointer to a NewDiskObject structure.
  108.  
  109.  
  110.    RESULT
  111.       None.
  112.  
  113.  
  114.    SEE ALSO
  115.       newicon.library/GetNewDiskObject(), icon.library/FreeDiskObject()
  116. RemapChunkyImage                                             RemapChunkyImage
  117.  
  118.  
  119.    NAME
  120.       RemapChunkyImage() -- Remaps a chunky image to be displayed on screen
  121.  
  122.    SYNOPSIS
  123.       image = RemapChunkyImage(chunkyimage, screen)
  124.         D0                       A0           A1
  125.  
  126.       struct Image  RemapChunkyImage(struct ChunkyImage *, struct Screen *)
  127.  
  128.    FUNCTION
  129.       Remaps a ChunkyImage to be displayed on a screen.  Caller must either
  130.       be the owner of the screen, or have locked it.  Under KS 3.0 (V39) and
  131.       up, it will use ObtainBestPen() if screen has shareable pens.
  132.       Otherwise will use the available colors.
  133.  
  134.       The image is returned as an Intuition Image structure, remapped so
  135.       chunky data palette match as closely as possible with the target
  136.       screen's palette, depending on the precision setting chosen by the
  137.       user in the NewIconsPrefs editor, and the available pens.
  138.  
  139.       Once done with your image, you should call FreeRemappedImage() to free
  140.       it and any allocated pens.
  141.  
  142.  
  143.    INPUTS
  144.       chunkydata -- A pointer to a ChunkyImage structure.
  145.       screen     -- A pointer to the destination Screen.
  146.  
  147.  
  148.    RESULT
  149.       Image -- An Intuition Image structure, or NIL if it fails.
  150.  
  151.  
  152.    NOTES
  153.       If the user has enabled the RTG Mode in the NewIconsPrefs, then the
  154.       allocated image will be in Fast RAM (if any Fast RAM is available).
  155.       
  156.  
  157.    SEE ALSO
  158.       newicon.library/FreeRemappedImage()
  159. FreeRemappedImage                                           FreeRemappedImage
  160.  
  161.  
  162.    NAME
  163.       FreeRemappedImage() -- Frees a remapped image and its pens.
  164.  
  165.  
  166.    SYNOPSIS
  167.       FreeRemappedImage(image, screen)
  168.                           A0     A1
  169.  
  170.       VOID  RemapChunkyImage(struct Image *, struct Screen *)
  171.  
  172.  
  173.    FUNCTION
  174.       This function frees a remapped image and also frees its pens. 
  175.       Therefore you must call it only after you are done with the image:
  176.       if you call it while it is still displayed on the screen, your image
  177.       could see its colors mangled since the pens would be freed.
  178.  
  179.       You must supply a screen argument.  It must either be the same
  180.       passed to RemapCHunkyImage, or NULL if the screen has been closed
  181.       in the meantime.
  182.  
  183.  
  184.    INPUTS
  185.       image  -- A pointer to a remapped Image structure.
  186.       screen -- A pointer to the Screen for which your ChunkyData was
  187.                 remapped, or NULL if the screen has been closed since then.
  188.  
  189.  
  190.    RESULT
  191.       None.
  192.  
  193.  
  194.    SEE ALSO
  195.       newicon.library/RemapChunkyImage()
  196.